package com.luhuiguo.cms.shared.event;

import com.google.gwt.event.shared.GwtEvent;

public class AddArticleEvent extends GwtEvent<AddArticleEventHandler> {

    public static Type<AddArticleEventHandler> TYPE = new Type<AddArticleEventHandler>();

    private final Long channelId;

    public AddArticleEvent(Long channelId) {
        this.channelId = channelId;
    }

    public Long getChannelId() {
        return channelId;
    }

    @Override
    protected void dispatch(AddArticleEventHandler handler) {
        handler.onAddArticle(this);

    }

    @Override
    public Type<AddArticleEventHandler> getAssociatedType() {
        return TYPE;
    }

}
